program define myoprob, eclass
    version 10.1
    syntax varlist [if] [in], [robust] ///
        [TECHnique(passthru)] [difficult]

    //  Separate the d.v. from i.v.(s).
    gettoken dv xvars : varlist

    //  Set type of vce to estimate (i.e. oim or robust).
        local vcetype = "oim"
        if "`robust'" != "" {
        local vcetype = "robust"
       }
    ml model lf myoprob_lf                    ///
        (Beta:  `dv' = `xvars')               ///
        /cut2                                 ///
        , title(Ordered Probit via ML)        ///
        vce(`vcetype')                        ///
        `technique'
    ml maximize, `difficult'
end
